#ifndef _RANGER_H
#define _RANGER_H

#define NUM_SONAR 2
#define SONAR_DOWN 0
#define SONAR_RIGHT 1
// -- Functions --------------------------------------------------------------
/*
* This function will send out a ping, wait for the response, and then return it.
* Note that if the closest physical object is out-of-range, this method will
* return the maximum range, and will not return any sort of special flag or error.
* Be aware that you shouldn't call this function in a tight loop, the sonar hardware
* needs at least 10ms between pulses. Thus be sure to use a short wait before calling
* it again.
*/
void getRange();
// ...........................................................................
/*
* Initializes the timer. If you forget to do this, it will be done automatically
* for you.
*/
void initTimer();
// ...........................................................................
/*
* Converts the current height and the desired height into an ideal duty cycle value.
* The absolute value of the returned value is the duty cycle, while the sign is
* the direction of the motor (positive is raising, negative is lowering).
*/

#endif
